package com.atguigu.spring.controller;

import com.atguigu.starter.service.AgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {


    //切换到master分支  团队上线v2版本 333333
    //切换到master分支  团队上线v2版本 22
    @Value("${hello.msg}")
    private String helloMessage;

    @Autowired
    private AgeService ageService;

    @RequestMapping("/hello")
    public String hello() {
        return "ok：" + helloMessage;
    }

    @RequestMapping("/show/age")
    public String showAge() {
        return "您今年的年龄是：" + ageService.computeAgeByBirthday();
    }

}
